﻿<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>分享</title>
    <link rel="stylesheet" href="../../../public/css/bootstrap.min.css">
    <link rel="stylesheet" href="css/share.css">
</head>

<body>
    <div class="share">
        <div class="wrap">
            <div class="black"></div>
            <img src="./img/top.png" alt="分享">
            <div>
                <div class="mask">
                    <img src="./img/mask.png" alt="mask">
                </div>
                <img src="./img/bottom.png" alt="分享">
            </div>
        </div>
        <div class="banner">
            <div>
                <img src="./img/logo.png" alt="爱卡卡">
                <div>
                    <strong>爱卡卡创业版</strong>
                    <p>随时随地随心支付</p>
                </div>
            </div>
            <button onclick="reg()">注册客户端</button>
        </div>
    </div>
    <script type="text/javascript" src="../../../public/js/jquery.min.js"></script>
    <!--<script type="text/javascript" src="../../pay/js/ntScroll.js"></script>-->
    <script>
        $(document).ready(function () {
            // new ntScroll(".share");
            let h = $('.wrap .mask').height();
            $('.wrap .mask').height(h / 2);
            let color = "#"+getUrlParam('color');
            $(".wrap ").css('backgroundColor', color);
            $(".wrap  .mask > img").css({
                'backgroundColor': hexToRgba(color,0.5),
            });
        });
        
        function reg() {
            var phone = getUrlParam('mobile');
            window.location.href = "http://akk.aikakapay.com/mobile/ss/doReg.do?agentId=2000000194&mobile="+phone+"&appId=0001";
        }

        function getUrlParam(name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
            var r = window.location.search.substr(1).match(reg);//匹配目标参数
            if (r != null) return (r[2]);
            return null; //返回参数值
        }

        function hexToRgba(hex, opacity) {
            return "rgba(" + parseInt("0x" + hex.slice(1, 3)) + "," + parseInt("0x" + hex.slice(3, 5)) + "," + parseInt("0x" + hex.slice(5, 7)) + "," + opacity + ")";
        }
        
    </script>
</body>

</html>